<div class="bjui-pageContent">
    <form action="{:url('Module/add')}" class="pageForm" data-toggle="validate" method="post">
        <div class="pageFormContent" data-layout-h="0">
            <table class="table-bordered table-condensed table-hover" width="100%">
                <tbody>
                <tr>
                    <td style="padding:5px 0px;">
                        <label for="j_title" class="control-label x85">中文名称：</label>
                        <input type="text" name="title" id="j_title" value="" data-rule="required;title;remote[{:url('Module/same')}]" size="24">
                    </td>
                </tr>
                <tr>
                    <td style="padding:5px 0px;">
                        <label for="j_module" class="control-label x85">模块名称：</label>
                        <input type="text" name="module" id="j_module" value="" data-rule="required;module;remote[{:url('Module/same')}]" size="24">
                    </td>
                </tr>
                <tr>
                    <td style="padding:5px 0px;">
                        <label for="j_father" class="control-label x85">所属模块：</label>
                        <select id="j_father" onchange="masp(this)" data-toggle="selectpicker" data-width="116">
                            {volist name="fArr" id="row"}
                            <option value="{$row.id}">{neq name="$row.id" value="0"}|-{/neq}{$row.title}</option>
                            {/volist}
                        </select>
                        <select name="fid" id="j_fid" data-toggle="selectpicker" data-width="120">
                            {volist name="sArr" id="row1"}
                            {eq name="$key" value="0"}
                                {volist name="row1" id="row"}
                                <option value="{$row.id}">{$row.title}</option>
                                {/volist}
                            {/eq}
                            {/volist}
                        </select>
                        {volist name="sArr" id="row1"}
                        <div id="fid_option_{$key}" style="display:none;">
                            {volist name="row1" id="row"}
                            <option value="{$row.id}">{$row.title}</option>
                            {/volist}
                        </div>
                        {/volist}
                    </td>
                </tr>
                <tr>
                    <td style="padding:5px 0px;">
                        <label for="j_faicon" class="control-label x85">模块图标：</label>
                        <input type="text" name="faicon" id="j_faicon" value="table" data-rule="" size="24">
                    </td>
                </tr>
                <tr>
                    <td style="padding:5px 0px;">
                        <label for="j_sort" class="control-label x85">排列顺序：</label>
                        <input type="text" name="sort" id="j_sort" value="0" size="24" data-toggle="spinner" data-min="0" data-max="99" data-step="1" data-rule="integer"> 0~99,越大越靠后
                    </td>
                </tr>
                <tr>
                    <td style="padding:5px 0px;height:35px;">
                        <label for="j_display" class="control-label x85">系统菜单：</label>
                        <input type="radio" name="display" id="j_display0" data-toggle="icheck" value="1" checked data-label="是&nbsp;&nbsp;">
                        <input type="radio" name="display" id="j_display1" data-toggle="icheck" value="0" data-label="否">
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="undo">取消</button></li>
        <li><button type="submit" class="btn-green" data-icon="save">保存</button></li>
    </ul>
</div>
<script type="text/javascript">
    function masp(obj){
        var fid = $(obj).val();
        $('#j_fid').selectpicker('destroy').html($('#fid_option_'+fid).html()).selectpicker('render');
        //$('#j_fid').html($('#fid_option_'+fid).html()).selectpicker('refresh');
    }
</script>